import {Injectable} from '@angular/core';
import {BaseHttpService} from './base-http.service';
import {FileTypeObj, PageInfo, SearchCommonVO} from '../types';
import {Observable} from 'rxjs';

@Injectable({
  providedIn: 'root'
})
export class LabelService {
  constructor(public http: BaseHttpService) {
  }

  /*
    public getFileLabelList(param: SearchCommonVO<any>): Observable<PageInfo<FileLabelObj>> {
      return this.http.post('/label', param, {needSuccessInfo: false});
    }
  */

  public getTypeList(param: SearchCommonVO<any>): Observable<PageInfo<FileTypeObj>> {
    return this.http.post('/type', param, {needSuccessInfo: false});
  }

  /*  public getFileLabelDetail(id: number): Observable<FileLabelObj> {
      return this.http.get(`/label/${id}`);
    }

    public delFileLabel(ids: number[]): Observable<void> {
      return this.http.post('/del-label', {ids}, {needSuccessInfo: true});
    }

    public addFileLabel(param: FileLabelObj): Observable<void> {
      return this.http.post('/add-label', param, {needSuccessInfo: true});
    }

    public editFileLabel(param: FileLabelObj): Observable<void> {
      return this.http.post('/update-label', FileTypeObj, {needSuccessInfo: true});
    }*/
}
